package duoTai;

public class TestPet1 {
public static void main(String[] args) {
	FatherPet fp=new Cat1();
	if(fp instanceof Dog1){
		fp.feed();
		((Dog1) fp).watch();
	}else if(fp instanceof Cat1){
		fp.feed();
		((Cat1)fp).catchMouse();
	}
}
}
